Conditions | 1 |
Total Lines | 7 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import {ConfigService} from '@nestjs/config'; |
||
5 | |||
6 | public async location(fileName: string, uploadedDate: Date): Promise<string> { |
||
7 | const destination = await this.configService.get<string>('UPLOAD_LOCATION'); |
||
8 | const month = uploadedDate.getMonth() + 1; |
||
9 | const year = uploadedDate.getFullYear(); |
||
10 | |||
11 | return `${destination}/${year}/${month}/${fileName}`; |
||
12 | } |
||
14 |